useFixture(default)

### Error's ....
def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoSales.bin')
		click('Edit1')
		select_menu('View>>Sorted Field Tree')
		#select('List', 'sale')
		select('Table', 'store', 'Field,0')
		select('Table', 'department', 'Field,1')
		select('Table', 'cell:Field,1(department)')
		click('Build Tree')
		#select('JTreeTable', '')
		rightclick('JTreeTable', 'keycode,1')
		select('JTreeTable', 'cell:keycode,1(null)')
		rightclick('JTreeTable', 'keycode,1')
		select_menu('Copy Record#{s#}')
		select('JTreeTable', 'cell:keycode,3(null)')
		rightclick('JTreeTable', 'keycode,3')
		select_menu('Paste Record#{s#}')
		select('JTreeTable', 'cell:store,3(null)')
		assert_p('JTreeTable', 'RowCount', '5')
		select('JTreeTable', 'cell:keycode,4(null)')
		rightclick('JTreeTable', 'store,4')
		select('JTreeTable', 'cell:keycode,4(null)')
		select_menu('View>>Table View #{Selected Records#}')
		select('JTreeTable', 'cell:keycode,4(null)')
		select('Table', 'cell:1|keycode,1(61664713)')
		assert_p('Table', 'Text', '61684613', '1|keycode,2')
		select('Table', 'cell:1|keycode,4(60694698)')
		assert_p('Table', 'Content', '[[61664713, 59, 335, 40118, 1, 17990], [61664713, 59, 335, 40118, -1, -17990], [61684613, 59, 335, 40118, 1, 12990], [68634752, 59, 410, 40118, 1, 8990], [60694698, 59, 620, 40118, 1, 3990], [60664659, 59, 620, 40118, 1, 3990], [60614487, 59, 878, 40118, 1, 5950], [63644339, 59, 878, 40118, 1, 12650], [67674686, 59, 929, 40118, 1, 3990], [64614401, 59, 957, 40118, 1, 1990], [64614401, 59, 957, 40118, 1, 1990], [62684217, 59, 957, 40118, 1, 9990], [64624770, 59, 957, 40118, 1, 2590]]')
		select('Table', 'cell:1|keycode,8(67674686)')
		assert_p('Table', 'RowCount', '13')
		select('Table', 'cell:1|keycode,8(67674686)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('JTreeTable', 'cell:keycode,1(null)')
		rightclick('JTreeTable', 'keycode,1')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:Tree,4(null)')
		rightclick('JTreeTable', 'keycode,4')
		select_menu('Copy Record#{s#}')
		select('JTreeTable', 'cell:keycode,7(null)')
		rightclick('JTreeTable', 'keycode,7')
		select_menu('Paste Record#{s#}')
		select('JTreeTable', 'cell:keycode,1(null)')
		rightclick('JTreeTable', 'keycode,1')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:keycode,5(null)')
		assert_p('JTreeTable', 'RowCount', '12')
		select('JTreeTable', 'cell:keycode,8(null)')
		assert_p('JTreeTable', 'RowCount', '12')
		select('JTreeTable', 'cell:keycode,8(null)')
		rightclick('JTreeTable', 'keycode,8')
		select_menu('Expand Tree')
		select('JTreeTable', 'cell:keycode,9(60694698)')
		assert_p('JTreeTable', 'Text', 'cell:keycode,9(60694698)')
		select('JTreeTable', 'cell:keycode,10(60664659)')
		assert_p('JTreeTable', 'Text', '60664659', 'keycode,10')
		select('JTreeTable', 'cell:keycode,9(60694698)')
		assert_p('JTreeTable', 'RowCount', '14')
		select('JTreeTable', 'rows:[9,10],columns:[keycode]')
		rightclick('JTreeTable', 'keycode,9')
		select('JTreeTable', 'rows:[9,10],columns:[keycode]')
		select_menu('View>>Table View #{Selected Records#}')
		select('JTreeTable', 'rows:[9,10],columns:[keycode]')
		select('Table', 'cell:1|keycode,0(60694698)')
		assert_p('Table', 'Content', '[[60694698, 59, 620, 40118, 1, 3990], [60664659, 59, 620, 40118, 1, 3990]]')
		select('Table', 'cell:1|keycode,0(60694698)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('JTreeTable', 'cell:Tree,4(null)')
		rightclick('JTreeTable', 'keycode,4')
		select_menu('Copy Record#{s#}')
		select('JTreeTable', 'cell:keycode,2(null)')
		rightclick('JTreeTable', 'keycode,2')
		select_menu('Paste Record#{s#} Prior')
		select('JTreeTable', 'cell:Tree,1(null)')
		rightclick('JTreeTable', 'Tree,1')
		select_menu('Expand Tree')
		select('JTreeTable', 'rows:[2,3],columns:[Tree]')
		select_menu('View>>Table View #{Selected Records#}')
		select('JTreeTable', 'rows:[2,3],columns:[Tree]')
		select('Table', 'cell:1|keycode,1(60664659)')
		assert_p('Table', 'Text', '59', '2|store,1')
		select('Table', 'cell:1|keycode,2(61664713)')
		assert_p('Table', 'Content', '[[60694698, 59, 620, 40118, 1, 3990], [60664659, 59, 620, 40118, 1, 3990], [61664713, 59, 335, 40118, 1, 17990], [61664713, 59, 335, 40118, -1, -17990], [61684613, 59, 335, 40118, 1, 12990]]')
		select('Table', 'cell:1|keycode,3(61664713)')
		assert_p('Table', 'RowCount', '5')
		select('Table', 'cell:1|keycode,3(61664713)')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select('JTreeTable', 'cell:Tree,12(null)')
		rightclick('JTreeTable', 'Tree,12')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		select_menu('Window>>protoSales.bin>>Table:')
		click('BasicInternalFrameTitlePane$NoFocusButton2')


		if window('Save Changes to file: ' + commonBits.sampleDir() + 'protoSales.bin'):
			click('No')
		close()
	close()
